package br.com.bafonline.model.dto;

/**
 * LeilaoId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class LeilaoId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -8999510444052777765L;
	private Integer codigo;
	private Integer cliente;
	private Double precoAtual;

	// Constructors

	/** default constructor */
	public LeilaoId() {
	}

	/** full constructor */
	public LeilaoId(Integer codigo, Integer cliente, Double precoAtual) {
		this.codigo = codigo;
		this.cliente = cliente;
		this.precoAtual = precoAtual;
	}

	// Property accessors

	public Integer getCodigo() {
		return this.codigo;
	}

	public void setCodigo(Integer codigo) {
		this.codigo = codigo;
	}

	public Integer getCliente() {
		return this.cliente;
	}

	public void setCliente(Integer cliente) {
		this.cliente = cliente;
	}

	public Double getPrecoAtual() {
		return this.precoAtual;
	}

	public void setPrecoAtual(Double precoAtual) {
		this.precoAtual = precoAtual;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LeilaoId))
			return false;
		LeilaoId castOther = (LeilaoId) other;

		return ((this.getCodigo() == castOther.getCodigo()) || (this
				.getCodigo() != null
				&& castOther.getCodigo() != null && this.getCodigo().equals(
				castOther.getCodigo())))
				&& ((this.getCliente() == castOther.getCliente()) || (this
						.getCliente() != null
						&& castOther.getCliente() != null && this.getCliente()
						.equals(castOther.getCliente())))
				&& ((this.getPrecoAtual() == castOther.getPrecoAtual()) || (this
						.getPrecoAtual() != null
						&& castOther.getPrecoAtual() != null && this
						.getPrecoAtual().equals(castOther.getPrecoAtual())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCodigo() == null ? 0 : this.getCodigo().hashCode());
		result = 37 * result
				+ (getCliente() == null ? 0 : this.getCliente().hashCode());
		result = 37
				* result
				+ (getPrecoAtual() == null ? 0 : this.getPrecoAtual()
						.hashCode());
		return result;
	}

}